﻿Imports System.ComponentModel

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class ucLessonDetails
    Inherits UcBaseEditControl
    Implements IUcEditControl

#Region "Designer"
    'UserControl overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.LessonCodelbl = New System.Windows.Forms.Label()
        Me.LessonCode = New org.codegen.win.controls.CGTextBox(Me.components)
        Me.LessonNamelbl = New System.Windows.Forms.Label()
        Me.LessonName = New org.codegen.win.controls.CGTextBox(Me.components)
        Me.MaxGradelbl = New System.Windows.Forms.Label()
        Me.DefaultMaxGrade = New org.codegen.win.controls.CGIntTextBox(Me.components)
        Me.PassGradelbl = New System.Windows.Forms.Label()
        Me.DefaultPassGrade = New org.codegen.win.controls.CGIntTextBox(Me.components)
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'LessonCodelbl
        '
        Me.LessonCodelbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonCodelbl.Location = New System.Drawing.Point(5, 15)
        Me.LessonCodelbl.Name = "LessonCodelbl"
        Me.LessonCodelbl.Size = New System.Drawing.Size(120, 20)
        Me.LessonCodelbl.TabIndex = 0
        Me.LessonCodelbl.Text = "Lesson Code"
        Me.LessonCodelbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'LessonCode
        '
        Me.LessonCode.AssociatedLabel = Me.LessonCodelbl
        Me.LessonCode.BackColor = System.Drawing.Color.LightYellow
        Me.LessonCode.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.LessonCode.ErrProvider = Nothing
        Me.LessonCode.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonCode.FormatPattern = Nothing
        Me.LessonCode.isMandatory = True
        Me.LessonCode.Location = New System.Drawing.Point(135, 15)
        Me.LessonCode.MaxLength = 255
        Me.LessonCode.MaxValue = Nothing
        Me.LessonCode.MinValue = Nothing
        Me.LessonCode.Name = "LessonCode"
        Me.LessonCode.showAsteriskForMandatory = True
        Me.LessonCode.Size = New System.Drawing.Size(200, 21)
        Me.LessonCode.TabIndex = 0
        '
        'LessonNamelbl
        '
        Me.LessonNamelbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonNamelbl.Location = New System.Drawing.Point(5, 45)
        Me.LessonNamelbl.Name = "LessonNamelbl"
        Me.LessonNamelbl.Size = New System.Drawing.Size(120, 20)
        Me.LessonNamelbl.TabIndex = 1
        Me.LessonNamelbl.Text = "Lesson Name"
        Me.LessonNamelbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'LessonName
        '
        Me.LessonName.AssociatedLabel = Me.LessonNamelbl
        Me.LessonName.BackColor = System.Drawing.Color.LightYellow
        Me.LessonName.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.LessonName.ErrProvider = Nothing
        Me.LessonName.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonName.FormatPattern = Nothing
        Me.LessonName.isMandatory = True
        Me.LessonName.Location = New System.Drawing.Point(135, 45)
        Me.LessonName.MaxLength = 255
        Me.LessonName.MaxValue = Nothing
        Me.LessonName.MinValue = Nothing
        Me.LessonName.Name = "LessonName"
        Me.LessonName.showAsteriskForMandatory = True
        Me.LessonName.Size = New System.Drawing.Size(200, 21)
        Me.LessonName.TabIndex = 1
        '
        'MaxGradelbl
        '
        Me.MaxGradelbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.MaxGradelbl.Location = New System.Drawing.Point(5, 75)
        Me.MaxGradelbl.Name = "MaxGradelbl"
        Me.MaxGradelbl.Size = New System.Drawing.Size(120, 20)
        Me.MaxGradelbl.TabIndex = 2
        Me.MaxGradelbl.Text = "Max Grade"
        Me.MaxGradelbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'DefaultMaxGrade
        '
        Me.DefaultMaxGrade.AssociatedLabel = Me.MaxGradelbl
        Me.DefaultMaxGrade.BackColor = System.Drawing.Color.LightYellow
        Me.DefaultMaxGrade.ErrProvider = Nothing
        Me.DefaultMaxGrade.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.DefaultMaxGrade.FormatPattern = Nothing
        Me.DefaultMaxGrade.isMandatory = True
        Me.DefaultMaxGrade.Location = New System.Drawing.Point(135, 75)
        Me.DefaultMaxGrade.MaxLength = 255
        Me.DefaultMaxGrade.MaxValue = Nothing
        Me.DefaultMaxGrade.MinValue = Nothing
        Me.DefaultMaxGrade.Name = "DefaultMaxGrade"
        Me.DefaultMaxGrade.showAsteriskForMandatory = True
        Me.DefaultMaxGrade.Size = New System.Drawing.Size(200, 21)
        Me.DefaultMaxGrade.TabIndex = 2
        '
        'PassGradelbl
        '
        Me.PassGradelbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.PassGradelbl.Location = New System.Drawing.Point(5, 105)
        Me.PassGradelbl.Name = "PassGradelbl"
        Me.PassGradelbl.Size = New System.Drawing.Size(120, 20)
        Me.PassGradelbl.TabIndex = 3
        Me.PassGradelbl.Text = "Pass Grade"
        Me.PassGradelbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'DefaultPassGrade
        '
        Me.DefaultPassGrade.AssociatedLabel = Me.PassGradelbl
        Me.DefaultPassGrade.BackColor = System.Drawing.Color.LightYellow
        Me.DefaultPassGrade.ErrProvider = Nothing
        Me.DefaultPassGrade.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.DefaultPassGrade.FormatPattern = Nothing
        Me.DefaultPassGrade.isMandatory = True
        Me.DefaultPassGrade.Location = New System.Drawing.Point(135, 105)
        Me.DefaultPassGrade.MaxLength = 255
        Me.DefaultPassGrade.MaxValue = Nothing
        Me.DefaultPassGrade.MinValue = Nothing
        Me.DefaultPassGrade.Name = "DefaultPassGrade"
        Me.DefaultPassGrade.showAsteriskForMandatory = True
        Me.DefaultPassGrade.Size = New System.Drawing.Size(200, 21)
        Me.DefaultPassGrade.TabIndex = 3
        '
        'ucLessonDetails
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
        Me.Controls.Add(Me.LessonCodelbl)
        Me.Controls.Add(Me.LessonCode)
        Me.Controls.Add(Me.LessonNamelbl)
        Me.Controls.Add(Me.LessonName)
        Me.Controls.Add(Me.MaxGradelbl)
        Me.Controls.Add(Me.DefaultMaxGrade)
        Me.Controls.Add(Me.PassGradelbl)
        Me.Controls.Add(Me.DefaultPassGrade)
        Me.Name = "ucLessonDetails"
        Me.Size = New System.Drawing.Size(996, 485)
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub



    Friend WithEvents LessonCodelbl As System.Windows.Forms.Label
    Friend WithEvents LessonCode As CGTextBox
    Friend WithEvents LessonNamelbl As System.Windows.Forms.Label
    Friend WithEvents LessonName As CGTextBox
    Friend WithEvents MaxGradelbl As System.Windows.Forms.Label
    Friend WithEvents DefaultMaxGrade As CGIntTextBox
    Friend WithEvents PassGradelbl As System.Windows.Forms.Label
    Friend WithEvents DefaultPassGrade As CGIntTextBox


#End Region

#Region "Properties"

#End Region

#Region "Methods"

    ''' <summary>
    ''' Fills the controls on the screen from data in the object
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadData() Handles Me.evLoadObjectData


        Dim mo As Lesson = DirectCast(Me.ModelObject(), Lesson)
        Me.LessonCode.value = mo.LessonCode
        Me.LessonName.value = mo.LessonName
        Me.DefaultMaxGrade.value = mo.DefaultMaxGrade
        Me.DefaultPassGrade.value = mo.DefaultPassGrade

    End Sub


    ''' <summary>
    ''' Loads the object from the database and then sets the proeperties 
    ''' of the object from values on the controls
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadToObject() Handles Me.evLoadToObject

        Dim mo As Lesson = DirectCast(Me.ModelObject, Lesson)
        mo.setLessonCode(Me.LessonCode.Text)
        mo.setLessonName(Me.LessonName.Text)
        mo.setDefaultMaxGrade(Me.DefaultMaxGrade.Text)
        mo.setDefaultPassGrade(Me.DefaultPassGrade.Text)


    End Sub

    Public Sub _InitializeControl() Handles Me.InitializeControl

        If Me.isInitialized = False Then
            'setup datasources here

            Me.isInitialized = True
        End If

    End Sub

#End Region


    Private Sub MaxGrade_LostFocus(ByVal sender As System.Object, _
                                     ByVal e As System.EventArgs) Handles DefaultMaxGrade.LostFocus

        Me.DefaultPassGrade.MinValue = CStr(0)
        If Me.DefaultMaxGrade.value IsNot Nothing Then
            Me.DefaultPassGrade.MaxValue = CStr(Me.DefaultMaxGrade.value)
        Else
            Me.DefaultPassGrade.MaxValue = Nothing
        End If

    End Sub

    
End Class


